<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>漫画内容</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/css/swiper.min.css">
    <style>
        .swiper-container {
            width: 600px;
            height: 300px;
        }
        *{
            margin:0;
            padding:0;
        }
        .swiper-slide>div{
            width:100vw;
            height: 100vh;
        }
        .swiper-slide img{
            width: 100%;
            height: 100%;
        }
        .swiper-container{
            width:100vw !important;
            height: 100vh !important;
        }
        .swiper-slide,.swiper-wrapper{
            width:100vw !important;
            height: 100vh !important;
        }
    </style>
</head>
<body>



<div class="swiper-container">
    <div class="swiper-wrapper">
        @if(count($comics) > 0)
            @foreach($comics as $comic)
                <div class="swiper-slide"><div><img src="{{route("Api.File.showImageById",["id"=>$comic->img_id])}}" alt=""></div></div>
            @endforeach
            @endif
    </div>
    <div class="swiper-pagination"></div>
</div>

</body>
<script
        src="https://code.jquery.com/jquery-3.3.1.min.js"
        integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
        crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.min.js"></script>

<script>

    var mySwiper = new Swiper ('.swiper-container', {
        loop: true,

        // 如果需要分页器
        // pagination: '.swiper-pagination',

        // // 如果需要前进后退按钮
        nextButton: '.swiper-button-next',
        prevButton: '.swiper-button-prev',
        effect : 'coverflow',
        slidesPerView: 1,
        centeredSlides: true,
        pagination : '.swiper-pagination',
        paginationType: 'fraction'

        // // 如果需要滚动条
        // scrollbar: '.swiper-scrollbar',
    })
</script>

</html>